import React from 'react'
import {Outlet,NavLink} from "react-router-dom"
import { Tabbar } from 'react-vant';
import {homePath} from "../../router/routerConfig"
function Home() {
  const tabArr=homePath.filter(item=>item.title)
  return (
    <div className="home">
      <main><Outlet></Outlet></main>
      <footer>
      <Tabbar>
        {
          tabArr&& tabArr.map((item,index)=>{
            return <Tabbar.Item icon={item.icon} key={index}>
             <NavLink to={item.path}>{item.title}</NavLink>
            </Tabbar.Item>
          })
        }
     
    </Tabbar>
      </footer>
    </div>
  )
}

export default Home